﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GBL.Repository.Resources
{
    public enum ResourceType
    {
        Original = 1,
        Custom = 2
    }

    public enum Splittings
    {
        Division, // partition (FR)
        Ordinary, // pièce (FR)
        Charges   // meuble (FR)
    }

    public enum DivisionType
    {
        NoDivision = 0,
        PartyPlain,
        PartyFess,
        PartyPale,
        PartyBend,
        PartyBendSinister,
        PartySaltire,
        PartyCross,
        PartyPall,
        TiercedBend,
        TiercedBendSinister,
        TiercedFess,
        TiercedPale
    }

    /// <summary>
    /// Represent all the standard points in the coa.
    /// </summary>
    [Flags]
    public enum Points
    {
        None = 1 << 0,
        /// <summary>
        /// dextre (right so left on the shield)
        /// </summary>
        Dexter = 1 << 1,
        /// <summary>
        /// senestre (left so right on the shield)
        /// </summary>
        Sinister = 1 << 2,
        /// <summary>
        /// Dextre du chef (top right so top left on the shield)
        /// </summary>
        DexterChief = 1 << 3,
        /// <summary>
        /// Point du chef (middle top)
        /// </summary>
        MiddleChief = 1 << 4,
        /// <summary>
        /// Senestre du chef (top left so top right on the shield)
        /// </summary>
        SinisterChief = 1 << 5,
        /// <summary>
        /// Dextre de la pointe (bottom right so bottom left on the shield)
        /// </summary>
        DexterBase = 1 << 6,
        /// <summary>
        /// Senestre de la pointe (bottom left so bottom right on the shield)
        /// </summary>
        SinisterBase = 1 << 7,
        /// <summary>
        /// point de la pointe (middle bottom) (seldom used)
        /// </summary>
        MiddleBase = 1 << 8,
        /// <summary>
        /// point d'honneur (top of the center between top and center)
        /// </summary>
        HonourPoint = 1 << 9,
        /// <summary>
        /// Coeur ou abime
        /// </summary>
        FessPoint = 1 << 10,
        /// <summary>
        /// nombril (bottom of the center between bottom and center)
        /// </summary>
        NombrilPoint = 1 << 11,
        /// <summary>
        /// Quarter top right of the shield
        /// </summary>
        TopRightQuarter = 1 << 12,
        /// <summary>
        /// Quarter top left of the shield
        /// </summary>
        TopLeftQuarter = 1 << 13,
        /// <summary>
        /// Quarter bottom right of the shield
        /// </summary>
        BottomRightQuarter = 1 << 14,
        /// <summary>
        /// Quaarter bottom left of the shield
        /// </summary>
        BottomLeftQuarter = 1 << 15,

        /// <summary>
        /// Cross division positions
        /// </summary>
        CrossTopRight = TopRightQuarter,
        CrossTopLeft = TopLeftQuarter,
        CrossBottomLeft = BottomLeftQuarter,
        CrossBottomRight = BottomRightQuarter,

        /// <summary>
        /// The top part of the shield finishing as a point in the center
        /// </summary>
        TopDiagonal = 1 << 16,
        /// <summary>
        /// The left part of the shield finishing as a point in the center
        /// </summary>
        LeftDiagonal = 1 << 17,
        /// <summary>
        /// The right part of the shield finishing as a point in the center
        /// </summary>
        RightDiagonal = 1 << 18,
        /// <summary>
        /// The bottom part of the shield finishing as a point in the center
        /// </summary>
        BottomDiagonal = 1 << 19,

        /// <summary>
        /// saltire division position
        /// </summary>
        SaltireTop = TopDiagonal,
        SaltireLeft = LeftDiagonal,
        SaltireRight = RightDiagonal,
        SaltireBottom = BottomDiagonal,

        /// <summary>
        /// Half top of the shield
        /// </summary>
        TopHalf = TopRightQuarter | TopLeftQuarter,
        FessTop = TopHalf,

        /// <summary>
        /// Half bottom of the shield
        /// </summary>
        BottomHalf = BottomRightQuarter | BottomLeftQuarter,
        FessBottom = BottomHalf,

        /// <summary>
        /// Half left of the shield
        /// </summary>
        LeftHalf = TopLeftQuarter | BottomLeftQuarter,
        PaleLeft = LeftHalf,

        /// <summary>
        /// Half right of the shield
        /// </summary>
        RightHalf = TopRightQuarter | BottomRightQuarter,
        PaleRight = RightHalf,

        /// <summary>
        /// Half cutting in diagonal topright one
        /// </summary>
        TopRightDiagonal = TopDiagonal | RightDiagonal,
        BendTop = TopRightDiagonal,

        /// <summary>
        /// Half cutting in diagonal topleft one
        /// </summary>
        TopLeftDiagonal = TopDiagonal | LeftDiagonal,
        BendSinisterTop = TopLeftDiagonal,

        /// <summary>
        /// Half cutting in diagonal bottomright one
        /// </summary>
        BottomRightDiagonal = BottomDiagonal | RightDiagonal,
        BendSinisterBottom = BottomRightDiagonal,

        /// <summary>
        /// Half cutting in diagonal bottomleft one
        /// </summary>
        BottomLeftDiagonal = BottomDiagonal | LeftDiagonal,
        BendBottom = BottomLeftDiagonal,

        /// <summary>
        /// Chevron division parts
        /// </summary>
        ChevronBottom = BottomDiagonal,
        ChevronTop = TopDiagonal | LeftDiagonal | RightDiagonal,

        /// <summary>
        /// Pall division part
        /// </summary>
        PallLeft = BottomLeftQuarter | LeftDiagonal,
        PallRight = BottomRightQuarter | RightDiagonal,
        PallTop = TopDiagonal,

        /// <summary>
        /// Quartered division parts
        /// </summary>
        QuarteredFirst = TopLeftQuarter | BottomRightQuarter,
        QuarteredSecond = TopRightQuarter | BottomLeftQuarter,

        /// <summary>
        /// chef (whole top)
        /// </summary>
        Chief = DexterChief | MiddleChief | SinisterChief,
        /// <summary>
        /// pointe (whole bottom)
        /// </summary>
        Base = DexterBase | MiddleBase | SinisterBase,
        
    }

    /// <summary>
    /// No custom, because a custom can be one of those enum value, so it ought to be a bool in the view model
    /// </summary>
    public enum TinctureType
    {
        Metal = 0,
        ColourBasic = 1,
        ColourLater = 2,
        Furs = 3
    }

    public enum TinctureMetals
    {
        TinctureOr,
        TinctureArgent
    }

    public enum TinctureColoursBasic
    {
        TinctureAzure,
        TinctureGules,
        TinctureSable,
        TinctureVert
    }

    public enum TinctureColourLater
    {
        TinctureAcier,
        TinctureCarnation,
        TinctureMurrey,
        TinctureOrange,
        TincturePurpure,
        TinctureSanguine
    }

    public enum Furs
    {
        FurErmine,
        FurErmines,
        FurErminois,
        FurPean,
        FurVair,
        FurVairInPal,
        FurVairEnPointe,
        FurCounterVair
    }
}
